<template>
    <div>
        <jsscom-heard />
        <div class="cons">
            <div class="news pu-con">
                <div class="news-1">
                    <router-link to="/home">首页</router-link>
                    <p>></p>
                    <router-link to>详情</router-link>
                </div>
                <div class="news-2">
                    <h1 v-text="newsData.title"></h1>
                    <p v-text="newsData.createTime"></p>
                    <div class="news-m" v-html="newsData.content"></div>
                </div>
            </div>
        </div>
        <com-foot></com-foot>
    </div>
</template>

<script>
import jsscomHeard from "@/components/jsscom-heard";
import comFoot from "@/components/com-foot";
import _ from "underscore";
import moment from "moment";
export default {
    components: {
        jsscomHeard,
        comFoot,
    },
    data() {
        return {
            newsData: {},
        };
    },
    created() {
        const id = this.$route.query.id;
        this.getZypxDes(id);
    },
    mounted() {},
    methods: {
        async getZypxDes(id) {
            var data = { id: id };
            const res = await this.$store.dispatch("news/getZypxDes", data);
            this.newsData = res;
            console.log(res);
        },
    },
};
</script>

<style scoped>
@import "./details.css";
</style>
